//
//  HNAudioPlayer.m
//  XDEducation
//
//  Created by 星道 on 17/6/5.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "HNAudioPlayer.h"

static HNAudioPlayer *Player = nil;
@implementation HNAudioPlayer

+ (void)ShareAudioPlayerWithUrlStr:(NSURL *)Url
{
    [Player pause];
    Player = nil;
    Player = [[HNAudioPlayer alloc] init];
    AVPlayerItem *playerItem = [[AVPlayerItem alloc]initWithURL:Url];
    [Player replaceCurrentItemWithPlayerItem:playerItem];

    [Player play];
}


+ (void)Close
{
    [Player pause];
    Player = nil;
}
@end
